package web.controller.my;

import framework.security.AuthService;
import framework.vo.ResultInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import security.vo.LoginInfo;

@Api(tags = "授权管理")
@RestController
@RequestMapping("/auth/")
public class AuthController {

    @Autowired
    private AuthService authService;

    /**
     * 登录
     *
     * @return
     */
    @PostMapping(value = "/login")
    public ResultInfo<LoginInfo> login(
            @RequestParam(required = true)
            @ApiParam(defaultValue = "admin") String username,
            @RequestParam(required = true)
            @ApiParam(defaultValue = "9dEEsDs4Oukc") String password,
            @RequestParam(required = false)
            @ApiParam(defaultValue = "", name = "passwordCipher", value = "gc") String passwordCipher,
            String captchaId, String captcha) {
        return null;
    }

    /**
     * 登录
     *
     * @return
     */
    @GetMapping("/logout")
    public ResultInfo<LoginInfo> logout() {
        return null;
    }

}
